#include <iostream>
#include <queue>

using namespace std;

typedef pair<int, int> PII; 

const int N = 105;
char a[N][N];
bool st[N][N];
int n, m;
int dx[] = {-1, 1, 0, 0};
int dy[] = {0, 0, -1, 1};

bool bfs() {
    queue<PII> q;
    q.push({1, 1});
    st[1][1] = true;
    
    while (q.size()) 
	{
        auto t = q.front(); q.pop();
        int x = t.first;
        int y = t.second;
        
        if (x == n && y == m) {
            return true;
        }
        
        for (int i = 0; i < 4; i++) {
            int nx = x + dx[i];
            int ny = y + dy[i];
            
            if (nx >= 1 && nx <= n && ny >= 1 && ny <= m && 
                a[nx][ny] == '.' && !st[nx][ny]) 
			{
                st[nx][ny] = true;
                q.push({nx, ny});
            }
        }
    }
    
    return false;
}

int main()
{
	cin >> n >> m;
	for(int i = 1; i <= n; i++)
	{
		for(int j = 1; j <= m; j++)
		{
			cin >> a[i][j];
		}
	}
	if(bfs()) cout << "yes" << endl;
	else cout << "no" << endl;
	return 0;
 } 
